<template>
  <div>
    <footer class="footer" v-show="list.length ? true : false">
      <span class="todo-count"
        ><strong>{{ list.length }}</strong
        >剩余</span
      >
      <ul class="filters">
        <li>
          <a class="selected" href="#/">全部</a>
        </li>
        <li>
          <a href="#/active" @click="num1">进行中</a>
        </li>
        <li>
          <a href="#/completed" @click="num2">已完成</a>
        </li>
      </ul>
      <button class="clear-completed" @click="num">清除已完成</button>
    </footer>
  </div>
</template>

<script>
export default {
  data () {
    return {
      flag: true
    }
  },
  methods: {
    num () {
      this.$emit('num')
    },
    num1 () {
      this.$emit('num1')
    },
    num2 () {
      this.$emit('num2')
    }
  },
  props: {
    list: {
      type: Array,
      require: true
    }
  }
}
</script>

<style scoped lang="less"></style>
